package com.youth.koodoReaderManager.service.impl;

import com.youth.koodoReaderManager.entity.Note;
import com.youth.koodoReaderManager.mapper.NoteMapper;
import com.youth.koodoReaderManager.service.NoteService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoteServiceImpl implements NoteService {
    private final NoteMapper noteMapper;

    public NoteServiceImpl(NoteMapper noteMapper) {
        this.noteMapper = noteMapper;
    }

    @Override
    public Note getNoteById(String id) {
        return noteMapper.selectById(id);
    }

    @Override
    public List<Note> listNotes() {
        return noteMapper.selectList(null);
    }

    // 实现其他业务逻辑方法...
}